import CommonAction from "../../../../../actions/common";

export default class HeaderAction extends CommonAction {
    constructor(comp) {
        super();
        this.comp = comp;
    }

    // 初始化
    didMount = () => {
        // 获取人数统计
    };

    // 卸载
    willUnMount = () => {

    };

    //每页显示条数
    pageSizeSelect = async (val) => {
        const {props} = this.comp;
        const {pageInfo} = props;
        pageInfo.pageSize = val;
        pageInfo.pageIndex = 1;

        await props.updateState({pageInfo});
        props.search();
    };

    //分页事件
    paginationEve = async (key) => {
        const {props} = this.comp;
        const {pageInfo} = props;
        pageInfo.pageIndex = key;

        await props.updateState({pageInfo});
        props.search();
    };
}